﻿using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SensorDrone.Net;
using SimpleMvvmToolkit;

namespace SensorDroneStudio.Services
{
    [ServiceAgentExport(typeof (ISensorDroneService), AgentType = AgentType.Mock)]
    internal class MockSensorDroneService : ISensorDroneService
    {
        public Task<IEnumerable<ISensorDrone>> ScanAsync()
        {
            Task<IEnumerable<ISensorDrone>> t = Task.Run(
                async () =>
                {
                    await Task.Delay(5000);
                    var drones = new List<ISensorDrone> {new MockSensorDrone("Drone1"), new MockSensorDrone("Drone2")};
                    return drones.AsEnumerable();
                });
            return t;
        }

        public void Stop()
        {
        }
    }
}